61 TT = 17:BT = 24: GOSUB 411: GOSUB 421: VTAB 18: GOSUB 461:W = 38:B = 10:T = 3:L = 1:X = 1: GOSUB 671: IF E = 1 THEN GOSUB 431: PRINT "Please add a PRINT statement": PRINT "to the program at LINE 40.": GOTO 61
71 SL = 2:BS = X: GOSUB 711: IF LN$ < >"40" THEN GOSUB 431: PRINT "You should start by typing": PRINT "40, then type a PRINT statement.": PRINT "Please try again.": GOTO 61
81 X = X +2: GOSUB 671: IF E = 1 THEN GOSUB 431: PRINT "You typed "; MID$ (BU$,BS)".": PRINT "You should follow the line": PRINT "number with a PRINT statement.": GOTO 61
91 GOSUB 721: ON E = 1 GOTO 61: GOSUB 671: IF E = 1 THEN GOSUB 431: PRINT "You typed "; MID$ (BU$,BS)".": PRINT "Please follow PRINT with a": PRINT "literal quote inside quotations.": PRINT "Try again.": GOTO 61
101 PN = 1: GOSUB 751: ON E = 1 GOTO 61: GOSUB 771: ON E = 1 GOTO 61: GOSUB 811: ON E = 1 GOTO 61
141 TT = 20:BT = 24: GOSUB 411: GOSUB 421: VTAB 21: GOSUB 461:W = 38:B = 10:T = 3:L = 1:X = 1: GOSUB 671: IF E = 1 THEN GOSUB 431: PRINT "Please change line 40 by typing": PRINT "40 and following it with a": PRINT "PRINT statement.": GOTO 141
151 SL = 2:BS = X: GOSUB 711: IF LN$ < >"40" THEN GOSUB 431: PRINT "You are trying to replace": PRINT "line 40 by typing 40 and a": PRINT "PRINT statement. Try again.": GOTO 141
161 X = X +2: GOSUB 671: IF E = 1 THEN GOSUB 431: PRINT "You typed "; MID$ (BU$,BS)".": PRINT "You should follow the line": PRINT "number with a PRINT statement.": GOTO 141
171 GOSUB 721: ON E = 1 GOTO 141: GOSUB 671: IF E = 1 THEN GOSUB 431: PRINT "You typed "; MID$ (BU$,BS)".": PRINT "You should type a new literal": PRINT "quote to replace the old one.": PRINT "Please try again.": GOTO 141
181 PN = 2: GOSUB 751: ON E = 1 GOTO 141: GOSUB 771: ON E = 1 GOTO 141: GOSUB 811: ON E = 1 GOTO 141
751 E = 0: IF MID$ (AN$,X,1) = CHR$(34) THEN RETURN
761 E = 1: GOSUB 431: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "You forgot to use a quotation": PRINT "mark (" CHR$(34)") after the PRINT": PRINT "statement. Please try again.": RETURN
771 E = 0:SL = X +1
781 ON SL > LEN(AN$) GOTO 801: IF MID$ (AN$,SL,1) < > CHR$(34) THEN SL = SL +1: GOTO 781
791 IF MID$ (AN$,SL,1) = CHR$(34) THEN RETURN
801 E = 1: GOSUB 431: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "Although it's not required, we'd": PRINT "like you to end your statement": PRINT "with a second "; CHR$(34);" mark. Try again.": RETURN
811 E = 0: IF SL > = X +2 THEN 831
821 E = 1: GOSUB 431: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "It would help for now if you": PRINT "would enclose something inside": PRINT "the quotations. Try again.": RETURN
841 E = 0: IF MID$ (AN$,X,3) = "RUN" THEN X = X +2: RETURN
851 E = 1: GOSUB 431: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "You should have typed RUN.": PRINT "Please try again.": RETURN
861 E = 0: IF MID$ (AN$,X,4) = "LIST" THEN X = X +3: RETURN
871 E = 1: GOSUB 431: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "You should have typed LIST.": PRINT "Please try again.": RETURN
881 E = 0: IF X > = LEN(AN$) THEN 921
891 FOR Y = X +1 TO LEN(AN$): IF MID$ (AN$,Y,1) < >" " THEN E = 1
901 NEXT Y: IF LD = 1 AND E = 1 THEN GOSUB 431: PRINT "You typed "; MID$ (BU$,BS)".": PRINT "You shouldn't type anything after": PRINT "the line number if you wish to": PRINT "to delete a line. Try again.": RETURN
911 IF E = 1 THEN GOSUB 431: PRINT "You typed "; MID$ (BU$,BS)".": PRINT "Please don't type anything after": PRINT "the command. It will just": PRINT "complicate things. Try again.": RETURN
921 RETURN
931 TT = TT(1):BT = BT(1):W = W(1):B = B(1):T = T(1):L = L(1): GOSUB 411: GOSUB 421: VTAB IV: GOSUB 461:X = 1: GOSUB 671: IF E = 1 THEN GOSUB 431: PRINT "Please type RUN and": PRINT "press RETURN. Try again.": GOTO 931
941 BS = X: GOSUB 841: ON E = 1 GOTO 931: GOSUB 881: ON E = 1 GOTO 931
951 RETURN
961 TT = TT(1):BT = BT(1):W = W(1):B = B(1):T = T(1):L = L(1): GOSUB 411: GOSUB 421: VTAB IV: GOSUB 461:X = 1: GOSUB 671: IF E = 1 THEN GOSUB 431: PRINT "Please type LIST and": PRINT "press RETURN. Try again.": GOTO 961
971 BS = X: GOSUB 861: ON E = 1 GOTO 961: GOSUB 881: ON E = 1 GOTO 961
981 RETURN
991 PRINT : PRINT CHR$(4);"OPEN ";F$: RETURN
1001 PRINT : PRINT CHR$(4);"CLOSE ";F$: RETURN
1011 POKE 32,0: POKE 33,40: POKE 34,0: POKE 35,24: IF I$(2) = "" THEN I$(2) = "AND PROGRAMMING, TOO!"